import {reqCategory} from "@/api"
export default {
    state:{
        category:[]
    },
    actions:{
     async getCategory({commit}){
        const result = await reqCategory()
        if(result.code ===200){
            commit('SAVE_CATEGORY',result.category.data)
        }
        }
      
    },
    mutations:{
        SAVE_CATEGORY(state,list){
            state.category = list
        }  
    },
    getters:{}
}